forEach

inline fun forEach(action: (T) -> Unit)

Runs action if this is a Some. Returns Unit without any action if this is None.

Parameters

action

Action to be run on a value of a Some.